package io.gitee.hfl.rocketmq.util;

import org.apache.rocketmq.shaded.commons.lang3.StringUtils;

/**
 * @author hefulin
 * @date 2022/9/7 15:01
 */
public class StrUtil {

    /**
     * 首字母转小写
     *
     * @param s 字符串
     * @return 转换后的字符串
     */
    public static String toLowerFirst(String s) {
        if (StringUtils.isBlank(s)) {
            return s;
        }
        if (Character.isLowerCase(s.charAt(0))) {
            return s;
        } else {
            return Character.toLowerCase(s.charAt(0)) + s.substring(1);
        }
    }

}
